#include <iostream>
#include "message.pb.h"

int main() {
    tutorial::Person person;
    person.set_name("Alice");
    person.set_id(123);
    person.set_email("alice@example.com");

    std::string buffer;
    person.SerializeToString(&buffer);

    tutorial::Person received_person;
    received_person.ParseFromString(buffer);

    std::cout << "Received Person:" << std::endl;
    std::cout << "Name: " << received_person.name() << std::endl;
    std::cout << "ID: " << received_person.id() << std::endl;
    std::cout << "Email: " << received_person.email() << std::endl;

    return 0;
}